/**
 * 公用
*/
export const commonProperties = [
    {
        model: 'model',
        widget: 'custom',
        label: '字段(确保唯一及必填)',
        ui: {
            placeholder: '请输入唯一字段值',
            maxlength: 50
        }
    },
    {
        model: 'label',
        widget: 'input',
        label: '标题',
        ui: {
            placeholder: '请输入标题',
            maxlength: 50
        }
    },
    {
        model: 'labelWidth',
        widget: 'input',
        label: '标题宽度',
        ui: {
            placeholder: '请携带单位(如: 100px)',
            maxlength: 10
        }
    },
    {
        model: 'col.span',
        widget: 'inputNumber',
        label: '分栏',
        ui: {
            placeholder: '请输入分栏数',
            min: 1,
            max: 24,
            precision: 0,
            controlsPosition: 'right',
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.disabled',
        widget: 'switch',
        label: '禁用'
    },
    {
        model: 'hidden',
        widget: 'switch',
        label: '隐藏'
    },
    {
        model: 'ui.size',
        widget: 'radioButton',
        label: '大小',
        enum: [
            { value: '默认', label: 'default' },
            { value: '小', label: 'mini' },
            { value: '中', label: 'small' },
            { value: '大', label: 'medium' },
            { value: '空', label: null }
        ],
        ui: {
            clearable: true,
            style: {
                placeholder: '请选择大小',
                width: '100%'
            }
        }
    }
]

/**
 * 校验规则
*/
export const rulesProperties = [
    {
        model: 'rules',
        widget: 'custom',
        label: '校验'
    }
]

/**
 * ui
*/

export const uiProperties = [
    {
        model: 'ui.placeholder',
        widget: 'input',
        label: '占位符'
    },
    {
        model: 'ui.clearable',
        widget: 'switch',
        label: '可清空'
    },
    {
        model: 'ui.readonly',
        widget: 'switch',
        label: '只读'
    }
]

/**
 * 样式 ui.style
*/
export const uiStyleProperties = [
    {
        model: 'ui.style.width',
        widget: 'input',
        label: '长度',
        ui: {
            placeholder: '请携带单位(如: 100px)或百分比(如: 100%)'
        }
    }
]

/**
 * 数据源 enum
*/
export const enumProperties = [
    {
        model: 'enum',
        widget: 'custom',
        label: '数据源'
    }
]
